package com.zishi.model.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.Alias;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author TP
 * @since 2022-05-05 08:53:41
 */
@Data
@Accessors(chain = true)
@TableName("article")
@Alias("Article")
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 副标题
     */
    @TableField("sub_title")
    private String subTitle;

    /**
     * 正文
     */
    @TableField("content")
    private String content;

    /**
     * 分类名,用;分隔,最后传LIst对象给前端
     */
    @TableField("categories")
    private String categories;

    @TableField("likes")
    private Integer likes;

    /**
     * 收藏数
     */
    @TableField("collection")
    private Integer collection;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;


}
